package com.ruoyi.xds.service.impl;

import com.ruoyi.xds.domain.HupRegion;
import com.ruoyi.xds.mapper.HupRegionMapper;
import com.ruoyi.xds.service.IHupRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 省市区Service业务层处理
 *
 * @author ruoyi
 * @date 2025-09-01
 */
@Service
public class HupRegionServiceImpl implements IHupRegionService {
    @Autowired
    private HupRegionMapper hupRegionMapper;

    /**
     * 查询省市区
     *
     * @param id 省市区主键
     * @return 省市区
     */
    @Override
    public HupRegion selectHupRegionById(Long id) {
        return hupRegionMapper.selectHupRegionById(id);
    }

    /**
     * 查询省市区列表
     *
     * @param hupRegion 省市区
     * @return 省市区
     */
    @Override
    public List<HupRegion> selectHupRegionList(HupRegion hupRegion) {
        return hupRegionMapper.selectHupRegionList(hupRegion);
    }

    /**
     * 新增省市区
     *
     * @param hupRegion 省市区
     * @return 结果
     */
    @Override
    public int insertHupRegion(HupRegion hupRegion) {
        return hupRegionMapper.insertHupRegion(hupRegion);
    }

    /**
     * 修改省市区
     *
     * @param hupRegion 省市区
     * @return 结果
     */
    @Override
    public int updateHupRegion(HupRegion hupRegion) {
        return hupRegionMapper.updateHupRegion(hupRegion);
    }

    /**
     * 批量删除省市区
     *
     * @param ids 需要删除的省市区主键
     * @return 结果
     */
    @Override
    public int deleteHupRegionByIds(Long[] ids) {
        return hupRegionMapper.deleteHupRegionByIds(ids);
    }

    /**
     * 删除省市区信息
     *
     * @param id 省市区主键
     * @return 结果
     */
    @Override
    public int deleteHupRegionById(Long id) {
        return hupRegionMapper.deleteHupRegionById(id);
    }
}
